<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
      
 <head>
 
 <title>Trabalhando com Facelets </title>
 <style>
	.table-header{
		padding: 5px;
		background-color: #CCC;
		color: #FFF;
	}
	.col-a{
		
	}
	.col-b{
		background-color: #EEE;
	}
 
 
 </style>
 
 </head>
 <body>
 		   
 <form jsfc="h:form">
 <span jsfc="h:messages"></span>
 	<table jsfc="h:dataTable" id="tabela" 
 		value="#{controle.todos}" var="item" 
		cellpadding="0" cellspacing="0" 
		headerClass="table-header" 
		columnClasses="col-a, col-b"
		border="1"
 	>
		<tr>         					
	          <td jsfc="h:column">
				<f:facet name="header">
					<h:outputText value="Nome"/>
				</f:facet>
				<h:outputText value="#{item.nome}"/>
	          </td> 
	          <td jsfc="h:column">
				<f:facet name="header">
					<h:outputText value="E-mail"/>
				</f:facet>
				<h:outputText value="#{item.email}"/>
	          </td> 	          
	          <td jsfc="h:column">
				<f:facet name="header">
					<h:outputText value="Telefone"/>
				</f:facet>
				<h:outputText value="#{item.telefone}"/>
	          </td> 	          
	          
	     </tr>
     </table>
     <a jsfc="h:commandLink"  action="#{controle.novo}">
     	Novo
     </a>
</form>      
</body>      
</html>